<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			// 1.创建被匹配的信息内容
			var str = "today is Monday";
			// 2.创建正则表达式 regular
			var reg = /Mon/;
			// 3.正则匹配 str里面有没有Mon这个子字符串
			var result = str.match(reg);
			// demo.html:13 ["Mon", index: 9, input: "today is Monday", groups: undefined]
			console.log(result1);
			
			var result2 = reg.test(str);
			console.log(result2);// true
		</script>
	</body>
</html>
